RWTH - Mindstorms NXT Toolbox

NXT_WriteIOMap

Writes the IO map to the given module ID

Contents

Syntax

NXT_WriteIOMap(mod_id, offset, n_bytes, data)

NXT_WriteIOMap(mod_id, offset, n_bytes, data, handle)

Description

NXT_WriteIOMap(mod_id, offset, n_bytes, data) write the data bytes to the given module ID (mod_id). The total number of bytes is given by n_bytes. The offset parameter determines the index position of the first byte.

NXT_WriteIOMap(mod_id, offset, n_bytes, data, handle) sends the IO map write command over the specific NXT handle handle (e.g. serial handle (PC) / file handle (Linux)).

If no NXT handle is specified the default one (COM_GetDefaultNXT) is used.

For more details see the official LEGO Mindstorms communication protocol.

Examples

   OutputModuleID = 131073
   NXT_WriteIOMap(OutputModuleID, 0, 30, bytes;
   handle = COM_OpenNXT('bluetooth.ini','check');
   OutputModuleID = 131073
   NXT_WriteIOMap(OutputModuleID, 0, 30, bytes, handle);

See also

NXT_ReadIOMap, COM_GetDefaultNXT

Signature